
#ifndef _CSTATEMENT_H_
#define _CSTATEMENT_H_

#include <SDL.h>
#include <map>
#include "IProcess.h"
#include "IStatement.h"

const int ENGINE_LOGO = -1;
const bool INIT_ON_LOAD = false;
const bool INIT_ON_NEED = true;

class CEngineLogo : public IStatement
{
public:
	bool InitFunc();
	void EventFunc();
	void FrameFunc();
	void RenderFunc();
	void CleanFunc();
};

class CStatementManager
{
public:
	CStatementManager();
	~CStatementManager();

	bool Push(IStatement* pStatement, int StatementId, bool init = false);
	void Pop(int StatementId);
	void PopAll();
	void JumpTo(int StatementId);

	void EventFunc();
	void FrameFunc();
	void RenderFunc();

private:
	int m_CurrentState;
	IStatement* m_CurrentFunc;
	std::map<int, IStatement*> m_Statements;
	std::map<int, IStatement*> m_InitList;
};

#endif